package org.dxy.domain.model.valueobject;

/**
 * 物料ID值对象
 * @author dxy
 * @createTime 2025/9/7
 */
public record MaterialId(Long value) {
    
    public MaterialId {
        if (value == null || value <= 0) {
            throw new IllegalArgumentException("物料ID不能为空或小于等于0");
        }
    }
    
    public static MaterialId of(Long value) {
        return new MaterialId(value);
    }
}